<!--  -->
<template>
<span>{{renderStringChangeArray()}}</span>
</template>

<script>
import { defineComponent } from 'vue';
export default defineComponent({
	props:{
		itemData:{
			type:Object,
			default:()=>({})
		}
	},
	setup(props){
		// 普通字符串转成数组
    function renderStringChangeArray(){
      let arrayStr = props.itemData ?? ''
      let arr = []
      if(arrayStr.length){
        arrayStr = arrayStr.substring(1, arrayStr.length - 1).split(',')
        arrayStr.forEach(item => {
          item = item.substring(1, item.length - 1)
          arr.push(item)
        }) 
      }
      return arr[0] || ''
    }
		return {
			renderStringChangeArray
		}
	}
})
</script>
<style lang='scss' scoped>

</style>